import React from "react"
import { Table} from 'dw-mx';
import {StringCell, NumberCell} from "dw-mx-table";
const { Column } = Table;

export default function ReadonlyLink() {
    const data = [
        {
            key: '1',
            left: '20',
            right: '20',
            center: '20'
        }
    ];

    return (
        <Table scroll={{ x: 880 }} dataSource={data} bordered>
            <Column ellipsis={true} title="序号" key="no" align={'center'} width={40}
                    render={(value, record, index) => {
                        return <StringCell value={index+1}/>;
                    }}/>
            <Column ellipsis={true} title="左对齐" dataIndex="left" key="left" align={'center'} width={120}
                    render={(value, record, index) => {
                        return <NumberCell value={value} align={"left"} mask={'0.0'} style={{color:'red'}}/>;
                    }}/>
            <Column ellipsis={true} title="右对齐" dataIndex="right" key="right" align={'center'} width={120}
                    render={(value, record, index) => {
                        return <NumberCell value={value} align={"right"}/>;
                    }}/>
            <Column ellipsis={true} title="剧中" dataIndex="center" key="center" align={'center'} width={120}
                    render={(value, record, index) => {
                        return <NumberCell value={value} align={"center"} mask={'0.000'}/>;
                    }}/>
        </Table>
    );
}